
package com.chuangan.releasetask.Utils;


import com.chuangan.releasetask.VO.ResultVO;

/**
 * 功能描述:
 * @Return: 统一返回
 * @Author: jinLong
 * @Date: 2020/5/27 23:29
 */
public class ResultVOUtil {

    public static ResultVO success(Object object) {
        ResultVO resultVO = new ResultVO();
        resultVO.setData(object);
        resultVO.setCode(200);
        resultVO.setMsg("成功");
        return resultVO;
    }

    public static ResultVO success() {
        return success(null);
    }


    public static ResultVO error(Integer code, String msg) {
        ResultVO resultVO = new ResultVO();
        resultVO.setCode(code);
        resultVO.setMsg(msg);
        return resultVO;
    }
}

